﻿<Window x:Class="SQLDataTransferer.Common.Dialogs.ExceptionDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Exception" 
        SizeToContent="Height"
        Width="544" 
        WindowStyle="ToolWindow"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner" 
        Style="{StaticResource Window}">
<Grid>
        <Border Margin="5"
            Padding="3"
            Style="{StaticResource nBorder}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="1"/>
                </Grid.RowDefinitions>
                <Label VerticalAlignment="Top"
                       VerticalContentAlignment="Center"
                       HorizontalAlignment="Left"
                       HorizontalContentAlignment="Left"
                       FontWeight="Bold"
                       Content="Message"/>
                <TextBox x:Name="txtMessage"
                         Grid.Row="1"
                         Height="83"
                         IsReadOnly="True"
                         VerticalAlignment="Top"
                         TextWrapping="Wrap"
                         ScrollViewer.CanContentScroll="True"
                         ScrollViewer.HorizontalScrollBarVisibility="Auto"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         Text="{Binding ElementName=cboExceptions, Path=SelectedItem.Message, Mode=OneWay}"/>
                <Expander Grid.Row="2"
                          ExpandDirection="Down" 
                          IsExpanded="False"
                          IsEnabled="True"
                          HorizontalAlignment="Stretch"
                          HorizontalContentAlignment="Stretch"
                          VerticalContentAlignment="Top"
                          FontWeight="Bold"
                          Header="Details">
                    <Grid Margin="3">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Label VerticalAlignment="Top"
                               VerticalContentAlignment="Center"
                               HorizontalAlignment="Left"
                               HorizontalContentAlignment="Left"
                               FontWeight="Bold"
                               Content="Exceptions"
                               Visibility="{Binding ElementName=cboExceptions, Path=Visibility}"/>
                        <ComboBox x:Name="cboExceptions"
                                  Grid.Row="1"  
                                  FontWeight="Normal"
                                  SelectedValue="StackTrace"
                                  Height="21"/>
                        <Label Grid.Row="2"                               
                               VerticalAlignment="Top"
                               VerticalContentAlignment="Center"
                               HorizontalAlignment="Left"
                               HorizontalContentAlignment="Left"
                               FontWeight="Bold"
                               Content="StackTrace"/>
                        <TextBox x:Name="txtStackTrace" 
                                 Grid.Row="3"
                                 Margin="0"
                                 Height="160"
                                 IsReadOnly="True"
                                 TextWrapping="Wrap"
                                 FontWeight="Normal"
                                 ScrollViewer.CanContentScroll="True"
                                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                 Text="{Binding ElementName=cboExceptions, Path=SelectedItem.StackTrace,Mode=OneWay}"/>
                    </Grid>
                </Expander>
            </Grid>
        </Border>
    </Grid>
</Window>
